<?php
/*========================================= JooSam =========================================/
/																							/
/	Extention:		JooSam																	/
/	Created by:		ScriptPlanet.eu															/
/	Site:			http://www.scriptplanet.eu												/
/	Email:			support@scriptplanet.eu													/
/	Support:		http://www.scriptplanet.eu/support										/
/	Copyright:		2011 (c) ScriptPlanet.eu												/
/	License:		CC BY-NC-ND 3.0 ~ http://creativecommons.org/licenses/by-nc-nd/3.0/		/
/	File Version:	0001																	/
/																							/
/========================================== JooSam ========================================*/
// Joomla security
defined('_JEXEC') or die;

class jsamSamdb extends mysqli{

	public function __construct(){

		
		error_reporting(E_ALL ^ E_WARNING);
		$jsam = new jsamMain();
		$host = $jsam->samdbSettings('host');
		$user = $jsam->samdbSettings('user');
		$pass = $jsam->samdbSettings('pass');
		$db = $jsam->samdbSettings('db');

		parent::__construct($host, $user, $pass, $db);

		if(mysqli_connect_error()){
			global $samerror;
			$samerror = JText::_('COM_JOOSAM_COM_REQUEST_MYSQL_ERROR').mysqli_connect_errno().', '.mysqli_connect_error() ;
		}
	}
}